library(raster)
library(sf)
source('https://raw.githubusercontent.com/oharac/src/master/R/common.R')
source(here('common_fxns.R'))
reload <- FALSEUsing the impact category level global maps, aggregate species impacts (for 2011-2013) and intensification (across 2003-2013) to country level. We also aggregate to marine ecoregion level. Values are by count and by proportion of threatened species.
Pull in EEZ raster and MEOW raster, and assemble into a dataframe. Include ocean area for area-weighted averaging.
Define a function to bring in all rasters (by year) of an impact, and place into dataframe format. From the raster filename, extract the stressor/impact and the year.
Plot the results based on the count and percent of local threatened species impacted by each impact category.
To get the percent by region, divide the mean impacted species by the mean species present. Note that the means can be divided, but the variance of the ratio is not calculated.
Plot the results based on the percent of local threatened species impacted by each impact category.
Plot the results based on the count and percent of local threatened species under intensification by each impact category.
To get the percent by region, divide the mean intensifying species by the mean species present. Note that the means can be divided, but the variance of the ratio is not calculated.
Plot the results based on the percent of local threatened species impacted by each impact category.